home *** CD-ROM | disk | FTP | other *** search
- From: jcoffin@rmii.com (Jerry Coffin)
- Message-ID: <MPLANET.314b1623jcoffin989869@news.rmii.com>
- X-Original-Date: Sat, 16 Mar 1996 12:27:31 -0700
- Path: in1.uu.net!bounce-back
- Date: 17 Mar 96 03:53:58 GMT
- Approved: fjh@cs.mu.oz.au
- Newsgroups: comp.std.c++
- Subject: Re: Conforming compilers should compile STL?
- Organization: TAEUS
- References: <199603151701.LAA06783@frodo.pswtech.com><Pine.A32.3.91.960315223344.90639A-100000@pluto.mscc.huji.ac.il>
- X-Newsreader: MicroPlanet News32 v1.00 Beta Build 302
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMUuM++EDnX0m9pzZAQH2GQGAoIqmrdFkxUAM5ocGOlyFjfGojogHlED+
- 4iSOoKA0s5nGpVEHN5UVMBrXE7Xb+LTo
- =XA0U
-
- In article <Pine.A32.3.91.960315223344.90639A-100000@pluto.mscc.huji.ac.il>,
- <mslamm@pluto.MSCC.huji.AC.IL> says...
-
- [ ... ]
-
- > This I can understand. But isn't the standard going to include an
- > implementation of the STL?
- >
- > It seems to me that only specifing the interface can lead to unexpected
- > problems.
-
- If the specification of the interface is too loose, it will doubtless lead to
- difficulties. IMO, if anything the specification of STL goes a bit too far,
- getting into some issues I'd consider more implementation considerations than
- interface. (guarantees of computational complexity being one of those areas.)
-
- > As far as I know other parts of the standard library are descirbed with
- > the implementation. Or is the implementation I see in magazines just the
- > authors fancy?
-
- No. The standard describes what each function has to do, but not how it has
- to do that. For instance, a string function might be required to return the
- position of a character in a string. The standard doesn't say it has to use a
- linear search to find it. If you wanted to, you could pre-index your strings
- and retrieve character positions from the index. Ultimately, as long as you
- accept the correct argument(s) and return the correct information, you're
- nearly free to implement things the way you choose.
-
- > One more question. If the STL is part of the proposed standard, won't
- > compiler vendors HAVE to supply some implemenation of it?
-
- If they want to conform to the C++ standard they will, as STL won't really be
- anything separate as such - it'll simply be another part of the standard like
- the string class, iostreams, etc.
-
- OTOH, it's worth noting that conformance to standards is far from being an
- absolute. There are lots of things that call themselves C compilers that
- aren't very close to the C standard, many FORTRAN compilers that "conform to
- FORTRAN 66 with some FORTRAN 77 extensions.", COBOL compilers that don't
- handle all of COBOL 74, etc.
-
- On one hand, there's little doubt that conforming to the C++ standard will be
- far more difficult than to the current FORTRAN and COBOL standards, but OTOH,
- it's quite clear that in the C/C++ market, there's a much greater push for a
- standard that's meaningful and compilers that conform to it. (In contrast to,
- for instance, the Pascal world, where saying a compiler conforms to the ANSI
- or ISO standard borders on being an insult...)
- Later,
- Jerry.
- ---
- [ comp.std.c++ is moderated. To submit articles: try just posting with ]
- [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
- [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
- [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
- [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
-